@import "./variables";

//  全局样式
* {
  margin: 0;
  padding: 0;
  list-style-type: none;
  outline: none;
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.2em;
  background-color: #f1f1f1;
  margin: 0;
  padding: 0;
}

a {
  color: #343440;
  text-decoration: none;
}

.clearfix {
  &::after {
    content: "";
    display: table;
    height: 0;
    line-height: 0;
    visibility: hidden;
    clear: both;
  }
}

//浮动
.float-r {
  float: right;
}

//浮动
.float-l {
  float: left;
}

//flex换行
.flexwp {
  flex-wrap: wrap;
}
//flex分布
.jcsb {
  justify-content: space-between;
}
.jcfe {
  justify-content: flex-end;
}
.jcst {
  justify-content: flex-start;
}
// 字体加粗
.fw-b {
  font-weight: bold;
}

//文章一行显示，多余省略号显示
.title-item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bg-color-black {
  background-color: rgba(19, 25, 47, 0.6);
}

.bg-color-blue {
  background-color: #1a5cd7;
}

.colorBlack {
  color: #272727 !important;

  &:hover {
    color: #272727 !important;
  }
}

.colorGrass {
  color: #33cea0;

  &:hover {
    color: #33cea0 !important;
  }
}

.colorRed {
  color: #ff5722;

  &:hover {
    color: #ff5722 !important;
  }
}

.colorText {
  color: #d3d6dd !important;

  &:hover {
    color: #d3d6dd !important;
  }
}

.colorBlue {
  color: #257dff !important;

  &:hover {
    color: #257dff !important;
  }
}

// titile字体
.titleBlue {
  color: #17CAF0 !important;
  font-size: 22px;
  font-weight: 500 !important;
}

// item蓝字
.itemBlue {
  color: #52CCFF;
  font-weight: bold !important;
}
// item白字
.itemfff {
  color: #FFFFFF;
  font-weight: 400 !important;    
}
.wrap{
  flex-wrap: wrap;
  max-width: 100px;
  margin: 0 auto;
}
.fs12{
  font-size: 12px;
}
.fs14{
  font-size: 14px;
}
.fs18{
  font-size: 18px;
}
.fs22{
  font-size: 22px;
}
.fs24{
  font-size: 24px;
}
.fs30{
  font-size: 30px;
}
.mt16{
  margin-top: 16px;
}
.mt22{
  margin-top: 22px;
}
.mt24{
  margin-top: 24px;
}
.mb10{
  margin-bottom: 10px;
}
.mb22{
  margin-bottom: 22px;
}
.mb24{
  margin-bottom: 24px;
}
.mb30{
  margin-bottom: 30px;
}
.mb40{
  margin-bottom: 40px;
}
.ml18{
  margin-left: 18px;
}
.ml40{
  margin-left: 40px;
}
.w20{
  width: 20%;
}
.w30{
  width: 30%;
}
.w33{
  width: 33%;
}
.w16{
  width:16.5%;
}
.c4380F0{
  color: #4380F0;
}
.p20{
  padding: 20px;
}
//颜色
@each $colorkey, $color in $colors {
  .text-#{$colorkey} {
    color: $color;
  }

  .bg-#{$colorkey} {
    background-color: $color;
  }
}

//对齐
@each $var in (left, center, right) {
  .text-#{$var} {
    text-align: $var !important;
  }
}

//flex
@each $key, $value in $flex-jc {
  .jc-#{$key} {
    justify-content: $value;
  }
}

@each $key, $value in $flex-ai {
  .ai-#{$key} {
    align-items: $value;
  }
}

//字体
@each $fontkey, $fontvalue in $font-sizes {
  .fs-#{$fontkey} {
    font-size: $fontvalue * $base-font-size;
  }
}

//.mt-1 => margin top
//spacing

@each $typekey, $type in $spacing-types {
  //.m-1
  @each $sizekey, $size in $spacing-sizes {
    .#{$typekey}-#{$sizekey} {
      #{$type}: $size * $spacing-base-size;
    }
  }

  //.mx-1
  @each $sizekey, $size in $spacing-sizes {
    .#{$typekey}x-#{$sizekey} {
      #{$type}-left: $size * $spacing-base-size;
      #{$type}-right: $size * $spacing-base-size;
    }

    .#{$typekey}y-#{$sizekey} {
      #{$type}-top: $size * $spacing-base-size;
      #{$type}-bottom: $size * $spacing-base-size;
    }
  }

  //.mt-1
  @each $directionkey, $direction in $spacing-directions {
    @each $sizekey, $size in $spacing-sizes {
      .#{$typekey}#{$directionkey}-#{$sizekey} {
        #{$type}-#{$direction}: $size * $spacing-base-size;
      }
    }
  }

  .#{$typekey} {
    #{$type}: 0;
  }
}
$color:"#";
@for $i from 12 to 61 {
  .fs#{$i} {  font-size: #{$i}px;  }
}

// 字体颜色 c111111-c99999
// 生成class .c1 .c2 .c3
@for $i from 1 to 10 {
  .c#{$i} {  color: #{$color}#{111111 * $i};  }
  .fw#{$i} {  font-weight: #{100 * $i};  }//字重
}
// margin-top 1px~100px
// 生成class .mt10 .mt5 .mt1  注意  m30-0 ===margin: 30px 0  pdding同理
@for $i from 1 to 101 {
  .mt#{$i} {
    margin-top: #{$i}px;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px;
  }
  .ml#{$i} {
    margin-left: #{$i}px;
  }
  .mr#{$i} {
    margin-right: #{$i}px;
  }
  .m0#{$i} {
    margin: 0 #{$i}px;
  }
  .m#{$i}-0 {
    margin:  #{$i}px 0;
  } 
  .m#{$i} {
    margin:  #{$i}px;
  }
  .pl#{$i} {
	  padding-left: #{$i}px;
  }
  .pr#{$i} {
  	  padding-right: #{$i}px;
  }
  .pt#{$i} {
  	  padding-top: #{$i}px;
  }
  .pb#{$i} {
  	  padding-bottom: #{$i}px;
  }
  .p0#{$i} {
  	  padding: 0 #{$i}px;
  }
  .p#{$i}-0 {
  	  padding:  #{$i}px 0;
  }
  .p#{$i} {
  	  padding:  #{$i}px;
  }
  .bdr#{$i} {
  	  border-radius:  #{$i}px;
  }
}
.df {
  display: flex;
}

.fdr {
  flex-direction: row;
}

.fdc {
  flex-direction: column;
}

.aic {
  align-items: center;
}

.aifs {
  align-items: flex-start;
}
.fWrap{
  flex-wrap: wrap;
}
.aife {
  align-items: flex-end;
}

.jcsb {
  justify-content: space-between;
}

.jcsa {
  justify-content: space-around;
}

.jcc {
  justify-content: center;
}

.jcfs {
  justify-content: flex-start;
}

.jcfe {
  justify-content: flex-end;
}

.fww {
  flex-wrap: wrap;
}

.frw {
  flex-flow: row wrap;
}
.fwb{
  font-weight: bold;
}
.textOver {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.c15DBF5 {
  color: #15dbf5;
}
.cFEC87F {
  color: #fec87f;
}
.cFF0000 {
  color: #ff0000;
}